/**
 * @param {character[]} s
 * @return {void} Do not return anything, modify s in-place instead.
 */
const reverseString = function (s: string[]): void {
    let beg = 0;
    let end = s.length - 1

    while (beg < end) {

        const left = s[beg]
        const right = s [end]

        if (left !== right) {

            s[beg] = right
            s[end] = left
        }

        beg++;
        end--
    }
};

let sa = 'abc'.split('')
reverseString(sa)
console.log(sa)


